#include <fstream>
#include <iomanip>
using namespace std;

int main()
{
    char s1[500];int cnt=0;
    ifstream inf("a.cpp");
    if(!inf.fail())
    {
        ofstream outf("b.cpp");
        while (!inf.eof()){
            inf.getline(s1,sizeof(s1)-1);
            outf<<setfill('0')<<setw(4)<<++cnt<<" "<<s1<<endl;
        }
        outf.close();
        inf.close();
    }
    return 0;
}